package com.naiterui.ehp.bp.bo.doctor;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * 医生审核认证BO
 */
public class RecordParamAuditBO implements Serializable {

    private static final long serialVersionUID = 3715028523533107510L;

    /**
     * 审核不通过-医生帐号认证状态
     */
    private static final int AUTH_STATUS_FAIL = 3;

    /**
     * 医生ID
     */
    private Long doctorId;

    /**
     * 备案状态 0.未备案 1.备案中 2.已备案 3.不通过
     */
    private Integer status;

    /**
     * 备案审核描述
     */
    private String failureReason;

    public boolean validate() {
        return doctorId == null || doctorId == 0 || status == null || (status == AUTH_STATUS_FAIL && StringUtils.isBlank(failureReason));
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getFailureReason() {
        return failureReason;
    }

    public void setFailureReason(String failureReason) {
        this.failureReason = failureReason;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
